/********************************************************************************
 *      Copyright:  (C) 2024 linuxer<linuxer@email.com>
 *                  All rights reserved.
 *
 *       Filename:  getTime.c
 *    Description:  This file 
 *
 *        Version:  1.0.0(17/03/24)
 *         Author:  linuxer <linuxer@email.com>
 *      ChangeLog:  1, Release initial version on "17/03/24 16:52:22"
 *                 
 ********************************************************************************/
#include "getTime.h"
//获取当前时间
int get_time(char* now_time)
{
	struct			tm* local_time;
	time_t			now;
	char			time_str[20];

	now=time(NULL);
	local_time=localtime(&now);
	strftime(time_str,sizeof(time_str),"%Y-%m-%d %H:%M:%S",local_time);
	strncpy(now_time,time_str,sizeof(time_str));
	return 0;
}


